<html>
<head><meta charset="utf-8"><title>Lint on declarations or types · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Lint.20on.20declarations.20or.20types.html">Lint on declarations or types</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221269265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Lint%20on%20declarations%20or%20types/near/221269265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caden Haustein <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Lint.20on.20declarations.20or.20types.html#221269265">(Dec 31 2020 at 04:41)</a>:</h4>
<p>I'm working on <a href="https://github.com/rust-lang/rust-clippy/issues/5598">https://github.com/rust-lang/rust-clippy/issues/5598</a>. Should I lint whenever something has the type <code>&amp;[char]</code> or only in function declarations, let declarations, etc to avoid spamming a bunch of lints if it is used frequently?</p>



<a name="221269994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Lint%20on%20declarations%20or%20types/near/221269994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Wright <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Lint.20on.20declarations.20or.20types.html#221269994">(Dec 31 2020 at 05:02)</a>:</h4>
<p>I would just take the approach that VEC_BOX and similar the other 'useless type' lints take.</p>



<a name="221270064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Lint%20on%20declarations%20or%20types/near/221270064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Wright <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Lint.20on.20declarations.20or.20types.html#221270064">(Dec 31 2020 at 05:04)</a>:</h4>
<p>Also, I think this lint is really questionable. "99.99% of the time" seems like a really bold statement.</p>



<a name="221270680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Lint%20on%20declarations%20or%20types/near/221270680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caden Haustein <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Lint.20on.20declarations.20or.20types.html#221270680">(Dec 31 2020 at 05:21)</a>:</h4>
<p>Should I hold off on working on it then? It does seem like a very rare lint to occur in the wild to me, and I don't know enough about Unicode to verify the issue author's claims.</p>



<a name="221270871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Lint%20on%20declarations%20or%20types/near/221270871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Wright <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Lint.20on.20declarations.20or.20types.html#221270871">(Dec 31 2020 at 05:26)</a>:</h4>
<p>I don't know much about Unicode either but I'm expecting <code>&amp;[char]</code> to be mostly used in non-unicode contexts.<br>
I'd finish the lint at least then we can try it out.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>